package com.zhouyong.dubboFramework.register;

import java.util.HashMap;

/**
 * dubbo接口的注册类（相当于缓存）
 *
 * @Author 99
 * @Date 2022/7/28 14:24
 * @Version 1.0
 */
public class LocalRegister {
    public static HashMap<String, Class<?>> map = new HashMap<>();

    public static void setMap(String interfaceName, Class<?> clazz) {
        if (map.containsKey(interfaceName)) {
            return;
        }
        map.put(interfaceName, clazz);
    }

    public static Class<?> getMap(String interfaceName) {
        return map.get(interfaceName);
    }
}
